home *** CD-ROM | disk | FTP | other *** search
- <HTML><BODY>
- <%
- '
- ' This file is provided as part of ASP Power Widgets Samples
- '
- ' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT
- ' WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
- ' INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
- ' OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
- ' PURPOSE.
-
- ' Copyright 1997-1998. All rights reserved.
- ' Dalun Software Inc. ASP Power Widgets
- ' http://www.dalun.com
- ' http://members.tripod.com/ActiveServerPage/
-
- ' MailMgt Object of ASPPW can send MIME 1.0 compliant mails using Base64 encoding.
-
- Set oMailMgt = Server.CreateObject("ASPPW.SMTP")
- oMailMgt.SMTP="202.92.1.2" 'Change this to your smtp server.
- oMailMgt.MailFrom="somebody@abc.com"
-
- oMailMgt.MailTo="urgentmail@yahoo.com"
- 'oMailMgt.MailTo="second_to@yahoo.com"
- 'oMailMgt.MailTo="third_to@yahoo.com"
-
- oMailMgt.MailCc ="first_cc@hotmail.com"
- 'oMailMgt.MailCc="second_cc@yahoo.com"
- 'oMailMgt.MailCc="third_cc@yahoo.com"
-
- oMailMgt.MailBcc ="first_bcc@yahoo.com"
- 'oMailMgt.MailBcc="second_bcc@yahoo.com"
- 'oMailMgt.MailBcc="third_bcc@yahoo.com"
-
- 'You may specify Errors-to and Reply-To or not
- oMailMgt.MailErrorsTo = "err@your_domain.com"
- oMailMgt.MailReplyTo= "urgentmail@yahoo.com"
-
- oMailMgt.MailSubject="Testing sendmail ASP object"
-
- oMailMgt.MailContent= "This is mail line 1."
- oMailMgt.MailContent= "This is mail line 2."
- oMailMgt.MailContent= "This is mail line 3."
-
- 'MailMgt object now can read a file directly.
- 'oMailMgt.MailContent = oMailMgt.ReadFile("c:\manual.txt") 'This is line 4 ...
-
- 'MailMgt object now can send attachments.
- 'oMailMgt.Attach = "c:\1.jpg"
- 'oMailMgt.Attach = "c:\laser.wav"
-
- 'MailMgt object now can log mail events. Log file - sendmail.log
- 'stays with MailMgt.dll in a same directory
-
- oMailMgt.LogEvent = False 'true or false
-
- 'Note: MailTo, MailCc, MailBcc, MailContent and MailAttachments are actually
- 'Visual Basic Collection objects.
-
- bReturnCode = oMailMgt.SendMail()
- response.write "Return Code is: " + CStr(bReturnCode) + "<br>"
-
- if bReturnCode=false then
- response.write oMailMgt.GetLastErrDescription + "<br>"
- end if
-
- 'Note: After sending out a mail successfully, properties of
- 'MailTo, MailBcc, MailCc, MailSubject, MailContent would be
- 'cleared automatically.
-
- oMailMgt.MailTo="urgentmail@yahoo.com"
- oMailMgt.MailSubject="Testing sendmail ASP object's resending"
-
- oMailMgt.MailContent= "This is mail line 3."
- oMailMgt.MailContent= "This is mail line 2."
- oMailMgt.MailContent= "This is mail line 1."
-
- bReturnCode = oMailMgt.SendMail()
- response.write "Return Code is: "+ CStr(bReturnCode) + "<br>"
-
- set oMailMgt = Nothing
- %>
- </BODY></HTML>
-